KmpWorkerDatabaseFactory

Android-specific factory for creating the SQLDelight KmpWorkerDatabase.

Usage:

val database = KmpWorkerDatabaseFactory.create(context)
val repository = SqlDelightTaskRepository(database)

Functions

Link copied to clipboard
fun create(context: Context, name: String = "kmpworker.db"): KmpWorkerDatabase

Creates a production SQLite-backed KmpWorkerDatabase.

Link copied to clipboard
fun createInMemory(context: Context): KmpWorkerDatabase

Creates an in-memory KmpWorkerDatabase for testing. Data is lost when the database is closed.